home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Singles Flirt Up Your Life! (German)
/
Singles Flirt Up Your Life.iso
/
data1.cab
/
Statemachine
/
questErotic4.lua
< prev
next >
Wrap
Text File
|
2004-01-29
|
3KB
|
85 lines
beginStateMachine()
-- called when questor builds up all known questScripts
onEnter(function(msg)
print("questErotic4 entered");
setState("initial");
end )
-- on game over: relationship conditions get reset to 0 and all quests are reset to initial
onMsg("questreset", function(msg)
setState("initial");
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("initial")
onMsg("checkCondition", function(msg)
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
if ( -- condition here
----------------
min( mike.getRelationshipCondition(ELAINE, REL_EROTIC),
elaine.getRelationshipCondition(MIKE, REL_EROTIC)) >= 4)
----------------
then
-- go to waitBed
print("questErotic4 - go to waitBed");
setState("waitBed");
end
end )
state("waitBed")
-- wait for elaine going to bed
onMsg("queueInteraction", function(msg)
--print("questErotic4 - queueInteraction: " .. msg.data);
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
if msg.data == "sleep" and getStateObjectFromID(msg.sender) == elaine then
-- go to talk position, mike kisses elaine
--elaine.cancelCurrentActivity(); -- cancel aktuelle activity, damit die eingepushedten drankommen
elaine.queueCommand("pm_talkCutscene", "talkCutscene", mike, "questErotic4");
elaine.queueCommand("pm_kissSexy", "kiss", mike, "Sexy", false); -- muss elaine sein sonst geht sie shclafen wΣhrend mike noch versucht sie zu kuessen
setState("talktome");
end
end )
state("talktome")
-- as soon as arrived - start dialog (interaction.talkCutscene sends talking)
onMsg("talking", function(msg)
if (msg.data == "questErotic4") then
popupConversation("dialogErotic4");
setState("donetalktome");
end
end )
state("donetalktome");
-- last dialog box clicked away
onMsg("yes", function(msg)
-- cancel
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
mike.cancelCurrentActivity();
elaine.cancelCurrentActivity();
setState("done");
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("done")
-- sackgasse hier
endStateMachine()